package com.xiaobias.distributed.pan.seurity.entity;

import com.fasterxml.jackson.annotation.JsonProperty;

import java.util.Collection;
import java.util.Map;

import lombok.Data;
import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.oauth2.core.user.OAuth2User;

@Data
public class BaiduUser
        implements OAuth2User {
    @JsonProperty("avatar_url")
    private String avatarUrl;
    @JsonProperty("baidu_name")
    private String baiduName;
    @JsonProperty("errmsg")
    private String errmsg;
    @JsonProperty("errno")
    private String errno;
    @JsonProperty("netdisk_name")
    private String netdiskName;
    @JsonProperty("request_id")
    private String requestId;
    @JsonProperty("uk")
    private String uk;
    @JsonProperty("vip_type")
    private String vipType;

    public Map<String, Object> getAttributes() {
        return null;
    }

    public Collection<? extends GrantedAuthority> getAuthorities() {
        return null;
    }

    public String getName() {
        return getBaiduName();
    }
}